//
//  ActivityDetailView.m
//  DoubanDemo1
//
//  Created by lanou3g on 15/11/21.
//  Copyright (c) 2015年 lanou3g. All rights reserved.
//

#import "ActivityDetailView.h"
#import "ActivityDetail.h"
#import "ActivityListHandle.h"
#import "ActivityList.h"
@implementation ActivityDetailView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self allViews];
    }
    return self;
}

- (void)allViews
{
    self.titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(30, 64, 315, 50)];
    //self.titleLabel.backgroundColor = [UIColor yellowColor];
    self.titleLabel.numberOfLines = 0;
    [self addSubview:self.titleLabel];
    
    self.activityImageView = [[UIImageView alloc]init];
    self.activityImageView.frame = CGRectMake(30, 114, 120, 166);
    //self.activityImageView.backgroundColor = [UIColor grayColor];
    [self addSubview:self.activityImageView];
    //活动时间ILView
    self.timeILView = [[ILView alloc]initWithFrame:CGRectMake(150, 114, 195, 30)];
    self.timeILView.leftImageView.image = [UIImage imageNamed:@"icon_date_blue@2x"];
    [self addSubview:self.timeILView];
    
    //主办方ILView
    self.sponsorILView = [[ILView alloc]initWithFrame:CGRectMake(150, 149, 195, 30)];
    self.sponsorILView.leftImageView.image = [UIImage imageNamed:@"icon_sponsor_blue@2x"];
    [self addSubview:self.sponsorILView];
    //活动类型ILView
    self.activityFormILView = [[ILView alloc]initWithFrame:CGRectMake(150, 184, 195, 30)];
    self.activityFormILView.leftImageView.image = [UIImage imageNamed:@"icon_catalog_blue@2x"];
    [self addSubview:self.activityFormILView];
    
    ////活动地点Image
    self.addressImageView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"icon_spot_blue@2x"]];
    self.addressImageView.frame = CGRectMake(150, 219, 30, 30);
    [self addSubview:self.addressImageView];
    
    //活动地点label
    self.addressLabel = [[UILabel alloc]initWithFrame:CGRectMake(180, 219, 165, 59)];
    //self.addressLabel.backgroundColor = [UIColor purpleColor];
    [self addSubview:self.addressLabel];
    
    //活动介绍label
    self.activityIntroduceLabel = [[UILabel alloc]initWithFrame:CGRectMake(30, 280, 315, 50)];
    //self.activityIntroduceLabel.backgroundColor = [UIColor redColor];
    [self addSubview:self.activityIntroduceLabel];
    //活动内容label
    self.activityContentLabel = [[UILabel alloc]initWithFrame:CGRectMake(30, 330, 315, 280)];
    //elf.activityContentLabel.backgroundColor = [UIColor greenColor];
    [self addSubview: self.activityContentLabel];
    
}

- (void)setActivityList:(ActivityList *)activityList
{
    self.titleLabel.text = activityList.title;
//    NSLog(@"%@",self.titleLabel.text);
}



@end
